<div class="page-content" >
            
    <div class="panel panel-default">
			 <div class="panel-heading">
			 <ul class="breadcrumb">
                    <li><a href="<{:U('student')}>">学生管理</a> </li>
                    <li class="active">导入学生</li>
                </ul>
			 </div>
        <div class="panel-body">
              <form enctype="multipart/form-data" class="form-horizontal" id="myform" method="post" action="<{:U('importdo')}>">
                        <input type="hidden" name="id" value="<{$data.user_id}>">
                    	
                            <div class="form-group">
                                <label for="input-title" class="col-sm-2 control-label">关联线下课程</label>
                                <div class="col-sm-7">
                                    <select class="form-control" name="offline_subject_id"> 
                                        <option value="">--请选择--</option>
                                        <volist name="list" id="vo">
                                        <option value="<{$vo.id}>"><{$vo.name}></option>
                                        </volist>
                                    </select>
                            
                                </div>
                            </div>
                            

                            <div class="form-group">
                                <label for="input-title"  class="col-sm-2 control-label">选择Excle文件</label>
                                <div class="col-sm-7">
                                    <input name="excel" class="form-control" id="excel" type="file" value="上传">
                            (<a href="/Apps/imp.xlsx" >查看示例</a>)
                                </div>
                            </div>
                           
                            <div class="form-group">
                                <div class="col-sm-7" align="center">
                                    <button class="btn btn-primary"  type="submit">确&nbsp;&nbsp;定</button>
                                </div>
                            </div>

                     </form>
        </div>
    </div>
   

        </div>


<script type="text/javascript">
    $('#excel').change(function(){
        var excel=$(this).val();
        var ext = excel.split('.')[1];
        if(ext == 'xls' || ext == 'xlsx'){
            
        }else{
            alert('请上传后缀为.xls或者.xlsx的文件');
            return false;
        }
    })
    $('#myform').submit(function(){
    
        var excel=$('#excel').val();
        if(excel==''){
            alert('请上传excel文件');
            return false;
        }
        var ext = excel.split('.')[1];
        if(ext == 'xls' || ext == 'xlsx'){
            
        }else{
            alert('请上传后缀为.xls或者.xlsx的文件');
            return false;
        }

    })
</script>
 
